<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>MOCK</title>
<link href="<%=request.getContextPath()%>/css/global.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/global.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/fingerprint2.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jstz.js"></script>
<script type="text/javascript" >

$(function(){
	payMock('7777');
})

var remarks = ['测试退款','必须退款','退着试试'];

function payMock(merNo){
	if(merNo=="7777"){
		$("#no").val("777700");
		$("#key").val("77777777");
	}
	if(merNo=="8888"){
		$("#no").val("888800");
		$("#key").val("88888888");
	}
	$("#percent").val(randomNumber(2)+".00");
	$("#remark").val(remarks[Math.floor(Math.random()*remarks.length)]);
}

function submitMock(type){
	$("#sform").attr("action",$("#sform").attr("action")+type+".jsp");
	$("#sform").submit();
}
</script>
</head>
<body style="background-color: #1c3e57; margin: 10px;">
	<div style="padding: 25px; margin-bottom:10px;border: 1px dotted #ccc; background-color: #fff;">
		<h1><a href="<%=request.getContextPath (  )%>">首页</a> | 模拟商户提交退款申请</h1>
	</div>
	<div style="padding: 25px; border: 1px dotted #ccc; background-color: #fff;">
	<form id="sform" action="<%=request.getContextPath()%>/" method="post">
	<table border="0" width="100%" >
			<tr>
				<td width="25%">退款参数 : &nbsp;&nbsp;<input class="submit" type="button" style="width:50px;" value="7777" onclick="payMock('7777')"><input class="submit"  type="button" style="width:50px;" value="8888" onclick="payMock('8888')"></td>
				<td width="25%"></td>
				<td width="25%"></td>
				<td width="25%"></td>
			</tr>
			<tr>
				<td><hr/></td>
				<td><hr/></td>
				<td><hr/></td>
				<td><hr/></td>
			</tr>
			<tr>
				<td>子帐号:</td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td><input style="width: 120px;" type="text" id="no" name="no"></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td>KEY:</td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td><input style="width: 240px;" type="text" id="key" name="key"></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td>交易号:</td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td><input style="width: 240px;" type="text" id="transaction" name="transaction"></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td>退款比例:</td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td><input style="width: 240px;" type="text" id="percent" name="percent"></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td>备注:</td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td><input style="width: 240px;" type="text" id="remark" name="remark"></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td>版本号(2.0.1)<input style="width: 120px;" type="hidden" id="version" name="version" value="2.0.1"></td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td><hr/></td>
				<td><hr/></td>
				<td><hr/></td>
				<td><hr/></td>
			</tr>
			<tr>
				<td align="left">
					<input type="button" class="submit" value="模拟支付" onclick="location.href='<%=request.getContextPath()%>/'">
				</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td align="right">
					<input type="button" class="submit" value="直联退款" onclick="submitMock('return')"></td>
			</tr>
		</table>
		</form>
	</div>
</body>